package com.erlang.springbootenableother.config;

import org.springframework.context.annotation.ImportSelector;
import org.springframework.core.type.AnnotationMetadata;

import java.util.function.Predicate;

/**
 * Created by IntelliJ IDEA.
 * 通过这里 可以读取某些外部文件中的类注入的ioc容器中
 * @author ZGQ
 */
public class MyImportSelector implements ImportSelector {
    @Override
    public String[] selectImports(AnnotationMetadata annotationMetadata) {
        return new String[]{"com.erlang.springbootenableother.entity.User", "com.erlang.springbootenableother.entity.Role"};
    }

    @Override
    public Predicate<String> getExclusionFilter() {
        return null;
    }
}
